package shapes3d;

import java.awt.Color;

import processing.core.PApplet;
import processing.core.PImage;
import processing.core.PVector;

public class Shape3D {

	protected PApplet app;

	protected PVector[][] coord;
	protected PVector[][] norm;
	
	protected boolean hasNormals;
	
	protected PImage skin;
	protected UV[][] uvLoc;
	
	protected boolean hasColor;
	protected int color;

	protected PVector pos = new PVector();
	
	protected PVector rot = new PVector();
	
	/**
	 * @return the pos
	 */
	public PVector getPos() {
		return pos;
	}

	/**
	 * @param pos the pos to set
	 */
	public void setPos(PVector pos) {
		this.pos = pos;
	}

	public void setX(float x){
		pos.x = x;
	}
	
	public void setY(float y){
		pos.y = y;
	}
	
	public void setZ(float z){
		pos.z = z;
	}
	
	
	/**
	 * @return the rot
	 */
	public PVector getRot() {
		return rot;
	}

	/**
	 * @param rot the rot to set
	 */
	public void setRot(PVector rot) {
		this.rot = rot;
	}

	public void setRotX(float x){
		rot.x = x;
	}
	
	public void setRotY(float y){
		rot.y = y;
	}
	
	public void setRotZ(float z){
		rot.z = z;
	}
	
	public void setColor(Color col){
		hasColor = true;
		this.color = app.color(col.getRed(), col.getGreen(), col.getBlue());
	}

	public void setColor(int col){
		hasColor = true;
		color = col;
	}

}
